/*package org.itboys.product.service;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.itboys.mongodb.core.MongoDataSource;
import org.itboys.mongodb.service.BaseService;
import org.itboys.mongodb.utils.page.Page;
import org.springframework.stereotype.Service;

*//**
 * 商品定金设置
 * @author weisky
 *
 *//*
@Service
public class ProductDepositService extends BaseService< ProductDeposit, Long>{

	private static final long serialVersionUID = 7949201417980454745L;
	
	@Resource(name = "productDS")
	private MongoDataSource ds;

	@Override
	protected MongoDataSource getMongoDataSource() {
		return ds;
	}

	@Override
	protected Class<ProductDeposit> getEntityClass() {
		return ProductDeposit.class;
	}
	
	*//**
	 * 根据商家ID 获取这个商家独有的定金设置
	 * @param sellerId
	 * @return
	 *//*
	public List<ProductDeposit> getProductDepositByProductId(Long sellerId){
		return super.findByField("sellerId", sellerId);
	}
	
	*//**
	 * 分页查询   并把商家名称组装好
	 * @param request
	 * @return
	 *//*
	public Page<ProductDeposit> page(HttpServletRequest request){
		Page<ProductDeposit> p = super.pageQuery(request);
		//组装商家名称
		return p;
	}
	
	*//**
	 * 新增或修改
	 * @param productDeposit
	 * @return
	 *//*
	public boolean insert(ProductDeposit productDeposit){
		try{
			if(productDeposit.getId() != 0){
				update(productDeposit);
			}else{
				save(productDeposit);
			}
			return true;
		}catch(Exception e){
			e.printStackTrace();
			logger.error("ProductDepositService.insert error", e);
		}
		return false;
	}
	
	*//**
	 * 删除
	 * @param id
	 * @return
	 *//*
	public boolean dele(Long id){
		try{
			super.delete(id);
			return true;
		}catch(Exception e){
			e.printStackTrace();
			logger.error("ProductDepositService.dele error", e);
		}
		return false;
	}
	
	*//**
	 * 获取所有的定金列表
	 * @return
	 *//*
	public List<ProductDeposit> getAll(){
		return super.findByField("isDeleted", 0);
	}
	

}
*/